<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML>
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>麦包郎</title>
	<meta name="description" content="麦包郎" />
	<meta name="keywords" content="麦包郎"/>
	<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
	<link rel="stylesheet" href="css/amazeui.min.css" />
	<link rel="stylesheet" href="css/style.css" />
	<script type="text/javascript" src="js/jquery.min.js" ></script>
	<script type="text/javascript" src="js/amazeui.min.js" ></script>
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    <header data-am-widget="header" class="am-header am-header-default header">
		  <div class="am-header-left am-header-nav">
		     <a href="<%=basePath%>emp/goMember" class="">
		       <i class="am-header-icon am-icon-angle-left"></i>
		     </a>
		  </div>
		  <h1 class="am-header-title"> <a href="#title-link" class="" style="color: #333;">收货地址</a></h1>
		  <div class="am-header-right am-header-nav">
		     <a href="#right-link" class=""> </a>
		  </div>
	  </header>
	  <ul class="address-list">
	  <c:forEach items="${addList}" var="add">
	    	<li class="curr">
	    		<p>收货人：${add.name}&nbsp;&nbsp;${add.phone}</p>
	    		<p class="order-add1">收货地址：${add.address}</p>
	    	    <hr>
	    	    <div class="address-cz">
		<c:choose>  
  
   					<c:when test="${add.isMo}">   
   					<p style="color: red;">默认</p> 
  					 </c:when>  
   					<c:otherwise>  
					<a href="address/deleteAdd?id=${add.id}">删除</a><a href="address/updateMo?id=${add.id}&empId=${add.empId}">设为默认地址</a>
   					</c:otherwise>  
		</c:choose>
                    
	    	    </div>
	    	</li>
	</c:forEach>
	    </ul>
	<div class="xin">

		新增地址
	</div>

	<div id="zheng">

			<p id="qqwq">
				<i class="am-header-icon am-icon-angle-left"></i>

			</p>



		<form method="post" action="address/addAddress">
			<input name="name" style="    padding: 25px; border-top: 1px solid #979797; margin-top: 20px;" class="input11" type="text" required="required" placeholder="姓名" >
			<input name="phone"   class="input11"   type="text" required="required" placeholder="手机" >
			<input name="address"  class="input11"  type="text" required="required" placeholder="收获地址" >
			<input type="hidden" name="isMo" value="true" />
			<button class="but11" type="submit">确认</button>
		</form>



	</div>
	</body>
	<script>
		var xin = document.getElementsByClassName("xin");
		xin[0].onclick = function () {

           zheng.style.display = "block";

        }
        qqwq.onclick = function () {
            zheng.style.display = "none";
        }
	</script>

</html>
